<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>flex布局练习</title>
		<style type="text/css">
			p{
				font-weight: bold;
			}
			.box{
				text-align: center;
				line-height: 50px;
				display: flex;
				border: 1px solid red;
				padding: 5px;
			}
			.box div{
				width: 50px;
				height: 50px;
				border: 1px solid blueviolet;
			}
			.box2{
				display: inline-flex;
			}
			.box3{
				flex-direction: row;
			}
			.box4{
				flex-direction: row-reverse;
			}
			.box5{
				flex-direction: column;
			}
			.box6{
				flex-direction: column-reverse;
			}
			.box7{
				flex-wrap: nowrap;
			}
			.box8{
				flex-wrap: wrap;
			}
			.box9{
				flex-wrap: wrap-reverse;
			}
			.box10{
				justify-content: flex-start;
			}
			.box11{
				justify-content: flex-end;
			}
			.box12{
				justify-content: center;
			}
			.box13{
				justify-content: space-between;
			}
			.box14{
				justify-content: flex-start;
			}
		</style>
	</head>
	<body>
		<p>display: flex;</p>
		<div class="box1 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>display: inline-flex;</p>
		<div class="box2 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>flex-direction: row;</p>
		<div class="box3 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>flex-direction: row-reverse;</p>
		<div class="box4 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>flex-direction: column;</p>
		<div class="box5 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>flex-direction: column-reverse;</p>
		<div class="box6 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>flex-wrap: nowrap;</p>
		<div class="box7 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>flex-wrap: wrap;</p>
		<div class="box8 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>flex-wrap: wrap-reverse;</p>
		<div class="box9 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>justify-content: flex-start;</p>
		<div class="box10 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>justify-content: flex-end;</p>
		<div class="box11 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>justify-content: center;</p>
		<div class="box12 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>justify-content: space-between;</p>
		<div class="box13 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
		<p>justify-content: flex-start;</p>
		<div class="box14 box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
		</div>
	</body>
</html>
